<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div align="center">
		修改的学生信息如下：
		<c:if test="${empty students}">
			找不到学生！<br>
		</c:if>
		<c:if test="${!empty students}">
			<table border="1">
				<tr>
					<th>学号</th>
					<th>姓名</th>
					<th>性别</th>
				</tr>
				<c:forEach var="s" items="${students}">
					<tr>
						<td>${s.stuno }</td>
						<td>${s.stuname }</td>
						<td>${s.stusex }</td>
					</tr>
				</c:forEach>
			</table>
		</c:if>

		<form action="student/saveStudent" >
			<table>
				<c:forEach var="s" items="${students}">
					<tr>
						<td>学号</td>
						<td><input type="text" name="stuno" value=${s.stuno }></td>
					</tr>
					<tr>
						<td>姓名</td>
						<td><input type="text" name="stuname" value=${s.stuname }></td>
					</tr>

					<tr>
						<td>性别</td>
						<td><input type="radio" name="stusex" value="男"
							<c:if test = "${s.stusex=='男' }">checked</c:if>> 男 <input
							type="radio" name="stusex" value="女"
							<c:if test = "${s.stusex=='女' }">checked</c:if>>女</td>
					</tr>
				</c:forEach>
				<tr>
					<td><input type="submit" value="确认修改"></td>

				</tr>

			</table>
		</form>
	</div>

</body>
</html>